package com.example.iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("jack");
        list.add("tom");
        list.add("jerry");

        Iterator<String> it = list.iterator();
        it.next();
        it.remove();
//        it.remove();
        System.out.println(list);
    }
}
